<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Hoodoo::Client::Endpoint::HTTP</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" />
<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>
    <div class="banner">
        <h1>
            <span class="type">Class</span>
            Hoodoo::Client::Endpoint::HTTP
                <span class="parent">&lt;
                    <a href="HTTPBased.html">Hoodoo::Client::Endpoint::HTTPBased</a>
                </span>
        </h1>
        <ul class="files">
            <li><a href="../../../../files/lib/hoodoo/client/endpoint/endpoints/http_rb.html">lib/hoodoo/client/endpoint/endpoints/http.rb</a></li>
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
    <div class="description">
      
<p>Talk to a resource that is contacted over <a href="HTTP.html">HTTP</a> or
HTTPS.</p>

<p>Configured with a <a
href="../../Services/Discovery/ForHTTP.html">Hoodoo::Services::Discovery::ForHTTP</a>
discovery result instance.</p>

    </div>








    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
        <dt>C</dt>
        <dd>
          <ul>
              <li>
                <a href="#method-i-configure_with">configure_with</a>,
              </li>
              <li>
                <a href="#method-i-create">create</a>
              </li>
          </ul>
        </dd>
        <dt>D</dt>
        <dd>
          <ul>
              <li>
                <a href="#method-i-delete">delete</a>
              </li>
          </ul>
        </dd>
        <dt>L</dt>
        <dd>
          <ul>
              <li>
                <a href="#method-i-list">list</a>
              </li>
          </ul>
        </dd>
        <dt>S</dt>
        <dd>
          <ul>
              <li>
                <a href="#method-i-show">show</a>
              </li>
          </ul>
        </dd>
        <dt>U</dt>
        <dd>
          <ul>
              <li>
                <a href="#method-i-update">update</a>
              </li>
          </ul>
        </dd>
    </dl>










    <!-- Methods -->
      <div class="sectiontitle">Instance Public methods</div>
        <div class="method">
          <div class="title method-title" id="method-i-create">
              <b>create</b>( body_hash, query_hash = nil )
            <a href="../../../../classes/Hoodoo/Client/Endpoint/HTTP.html#method-i-create" name="method-i-create" class="permalink">Link</a>
          </div>

            <div class="description">
              <p>See <a
href="../Endpoint.html#method-i-create">Hoodoo::Client::Endpoint#create</a>.</p>
            </div>



            <div class="sourcecode">
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a>
              </p>
              <div id="method-i-create_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/hoodoo/client/endpoint/endpoints/http.rb, line 69</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span>( <span class="ruby-identifier">body_hash</span>, <span class="ruby-identifier">query_hash</span> = <span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">d</span>            = <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">action</span>     = <span class="ruby-value">:create</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">body_hash</span>  = <span class="ruby-identifier">body_hash</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">query_hash</span> = <span class="ruby-identifier">query_hash</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">do_http</span>( <span class="ruby-identifier">d</span> )
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
          </div>
        <div class="method">
          <div class="title method-title" id="method-i-delete">
              <b>delete</b>( ident, query_hash = nil )
            <a href="../../../../classes/Hoodoo/Client/Endpoint/HTTP.html#method-i-delete" name="method-i-delete" class="permalink">Link</a>
          </div>

            <div class="description">
              <p>See <a
href="../Endpoint.html#method-i-delete">Hoodoo::Client::Endpoint#delete</a>.</p>
            </div>



            <div class="sourcecode">
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-delete_source')" id="l_method-i-delete_source">show</a>
              </p>
              <div id="method-i-delete_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/hoodoo/client/endpoint/endpoints/http.rb, line 92</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">delete</span>( <span class="ruby-identifier">ident</span>, <span class="ruby-identifier">query_hash</span> = <span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">d</span>            = <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">action</span>     = <span class="ruby-value">:delete</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">ident</span>      = <span class="ruby-identifier">ident</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">query_hash</span> = <span class="ruby-identifier">query_hash</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">do_http</span>( <span class="ruby-identifier">d</span> )
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
          </div>
        <div class="method">
          <div class="title method-title" id="method-i-list">
              <b>list</b>( query_hash = nil )
            <a href="../../../../classes/Hoodoo/Client/Endpoint/HTTP.html#method-i-list" name="method-i-list" class="permalink">Link</a>
          </div>

            <div class="description">
              <p>See <a
href="../Endpoint.html#method-i-list">Hoodoo::Client::Endpoint#list</a>.</p>
            </div>



            <div class="sourcecode">
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-list_source')" id="l_method-i-list_source">show</a>
              </p>
              <div id="method-i-list_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/hoodoo/client/endpoint/endpoints/http.rb, line 48</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">list</span>( <span class="ruby-identifier">query_hash</span> = <span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">d</span>            = <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">dup</span> <span class="ruby-comment"># This does NOT dup the objects to which @description points</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">action</span>     = <span class="ruby-value">:list</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">query_hash</span> = <span class="ruby-identifier">query_hash</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">inject_enumeration_state</span>( <span class="ruby-identifier">do_http</span>( <span class="ruby-identifier">d</span> ), <span class="ruby-identifier">query_hash</span> )
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
          </div>
        <div class="method">
          <div class="title method-title" id="method-i-show">
              <b>show</b>( ident, query_hash = nil )
            <a href="../../../../classes/Hoodoo/Client/Endpoint/HTTP.html#method-i-show" name="method-i-show" class="permalink">Link</a>
          </div>

            <div class="description">
              <p>See <a
href="../Endpoint.html#method-i-show">Hoodoo::Client::Endpoint#show</a>.</p>
            </div>



            <div class="sourcecode">
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a>
              </p>
              <div id="method-i-show_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/hoodoo/client/endpoint/endpoints/http.rb, line 58</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span>( <span class="ruby-identifier">ident</span>, <span class="ruby-identifier">query_hash</span> = <span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">d</span>            = <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">action</span>     = <span class="ruby-value">:show</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">ident</span>      = <span class="ruby-identifier">ident</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">query_hash</span> = <span class="ruby-identifier">query_hash</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">do_http</span>( <span class="ruby-identifier">d</span> )
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
          </div>
        <div class="method">
          <div class="title method-title" id="method-i-update">
              <b>update</b>( ident, body_hash, query_hash = nil )
            <a href="../../../../classes/Hoodoo/Client/Endpoint/HTTP.html#method-i-update" name="method-i-update" class="permalink">Link</a>
          </div>

            <div class="description">
              <p>See <a
href="../Endpoint.html#method-i-update">Hoodoo::Client::Endpoint#update</a>.</p>
            </div>



            <div class="sourcecode">
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a>
              </p>
              <div id="method-i-update_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/hoodoo/client/endpoint/endpoints/http.rb, line 80</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span>( <span class="ruby-identifier">ident</span>, <span class="ruby-identifier">body_hash</span>, <span class="ruby-identifier">query_hash</span> = <span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">d</span>            = <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">action</span>     = <span class="ruby-value">:update</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">ident</span>      = <span class="ruby-identifier">ident</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">body_hash</span>  = <span class="ruby-identifier">body_hash</span>
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">query_hash</span> = <span class="ruby-identifier">query_hash</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">do_http</span>( <span class="ruby-identifier">d</span> )
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
          </div>
      <div class="sectiontitle">Instance Protected methods</div>
        <div class="method">
          <div class="title method-title" id="method-i-configure_with">
              <b>configure_with</b>( resource, version, options )
            <a href="../../../../classes/Hoodoo/Client/Endpoint/HTTP.html#method-i-configure_with" name="method-i-configure_with" class="permalink">Link</a>
          </div>

            <div class="description">
              <p>See <a
href="../Endpoint.html#method-i-configure_with">Hoodoo::Client::Endpoint#configure_with</a>.</p>

<p>Requires a <a
href="../../Services/Discovery/ForHTTP.html">Hoodoo::Services::Discovery::ForHTTP</a>
instance in the <code>discovery_result</code> field of the
<code>options</code> Hash.</p>
            </div>



            <div class="sourcecode">
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-configure_with_source')" id="l_method-i-configure_with_source">show</a>
              </p>
              <div id="method-i-configure_with_source" class="dyn-source">
                <pre><span class="ruby-comment"># File lib/hoodoo/client/endpoint/endpoints/http.rb, line 31</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">configure_with</span>( <span class="ruby-identifier">resource</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span> )
  <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@discovery_result</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Hoodoo</span><span class="ruby-operator">::</span><span class="ruby-constant">Services</span><span class="ruby-operator">::</span><span class="ruby-constant">Discovery</span><span class="ruby-operator">::</span><span class="ruby-constant">ForHTTP</span> )
    <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Hoodoo::Client::Endpoint::HTTP must be configured with a Hoodoo::Services::Discovery::ForHTTP instance - got &#39;#{ @discovery_result.class.name }&#39;&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-ivar">@description</span>                  = <span class="ruby-constant">Hoodoo</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span><span class="ruby-operator">::</span><span class="ruby-constant">Endpoint</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPBased</span><span class="ruby-operator">::</span><span class="ruby-constant">DescriptionOfRequest</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">discovery_result</span> = <span class="ruby-ivar">@discovery_result</span>
  <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">endpoint_uri</span>     = <span class="ruby-ivar">@discovery_result</span>.<span class="ruby-identifier">endpoint_uri</span>
  <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">proxy_uri</span>        = <span class="ruby-ivar">@discovery_result</span>.<span class="ruby-identifier">proxy_uri</span>
  <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">ca_file</span>          = <span class="ruby-ivar">@discovery_result</span>.<span class="ruby-identifier">ca_file</span>
  <span class="ruby-ivar">@description</span>.<span class="ruby-identifier">http_timeout</span>     = <span class="ruby-ivar">@discovery_result</span>.<span class="ruby-identifier">http_timeout</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
          </div>
</div>

    </div>
  </body>
</html>
